package com.book.mapper;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.RowBounds;

import com.book.entity.Book;
import org.springframework.stereotype.Repository;

@Repository
public interface BookMapper extends BaseMapper<Book>{

	//todo
	List<Book> query(Map<String, Object> params,RowBounds rowBounds);

	//todo
	int queryCount(Map<String, Object> params);

	@Select("SELECT * FROM book WHERE bname LIKE '%${keyword}%'")
	List<Book> search(@Param("keyword") String keyword);
}
